import requests


class Config:
    def __init__(self,url):
        self.url = url
        self.session = requests.session()

    def send_request(self,url,method,params=None,data=None,json=None,**kwargs):
        url = f"{self.url}{url}"
        req = requests.request(
            method=method,
            url=url,
            data=data,
            json=json,
            params=params
            **kwargs
        )
        return req

    def post(self,url,**kwargs):
        return Config.send_request(method="POST",url=url,**kwargs)

    def get(self, url, **kwargs):
        return Config.send_request(method="GET", url=url, **kwargs)

    def put(self, url, **kwargs):
        return Config.send_request(method="PUT", url=url, **kwargs)

    def delete(self, url, **kwargs):
        return Config.send_request(method="DELETE", url=url, **kwargs)





